home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 411_01 / vim / macros / keyword < prev    next >
Encoding:
Text File  |  1993-12-13  |  534 b   |  15 lines

  1. " Some handy keyword-completion macros.
  2. " The word in front of the cursor is taken as a search string, the previous
  3. " partially matching word is found which then replaces the word in front
  4. " of the cursor. The macros work in insert mode.
  5. "
  6. " ^K searches backward for the first match
  7. " ^N searches backward for the next match (after ^K)
  8. " ^P searches forward for the previous match (after ^K)
  9. "
  10. " Thanks to Dave Caughey.
  11. "
  12. :map!   bmmi?\<`m"nyf@nmn"nyw`mcfn
  13. :map!  .`nnmn"nyw`mcf.n
  14. :map!  .`nNmn"nyw`mcf.n
  15.